<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="UTF-8">
<head th:include="includes/list-include :: list-header"></head>
<body class="gray-bg">

<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="myForm" class="form-inline">
                <div class="row">
                    <div class="form-group">
                        <div class="col-md-4">
                            <select class="form-control" id="dictType" name="dictType">
                                <option th:each="dict : ${dictList}" th:text="${dict['dictName']}" th:value="${dict['dictType']}" th:field="*{dict.dictType}"></option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-4">
                            <input type="text" id="dictCode" name="dictCode" placeholder="字典编码" class="form-control">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-4">
                            <input type="text" id="dictValue" name="dictValue" placeholder="字典值" class="form-control">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-4">
                            <select id="status" name="status"
                                    class="selectpicker show-tick form-control" th:with="types=${@dict.getData('normal_status')}">
                                <option value="">-- 字典状态 --</option>
                                <option th:each="dict : ${types}" th:value="${dict.dictCode}" th:text="${dict.dictValue}"></option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <a class="btn btn-info btn-rounded btn-rd" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;查询</a>
                        <a class="btn btn-warning btn-rounded btn-rd" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                    </div>
                </div>
            </form>
        </div>

        <div class="btn-group-sm hidden-xs" id="toolbar" role="group">
            <a class="btn btn-success" th:onclick="'javascript:$.operate.addFull(\''+${dict.dictType}+'\')'" shiro:hasPermission="system:dictType:add">
                <i class="fa fa-plus"></i> 新增
            </a>
            <a class="btn btn-primary btn-edit disabled" onclick="$.operate.editFull()" shiro:hasPermission="system:dictType:edit">
                <i class="fa fa-edit"></i> 修改
            </a>
            <a class="btn btn-danger btn-del disabled" onclick="$.operate.batRemove()" shiro:hasPermission="system:dictType:remove">
                <i class="fa fa-remove"></i> 删除
            </a>
        </div>

        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table" data-mobile-responsive="true"></table>
        </div>
    </div>
</div>
<div th:include="includes/list-include :: list-footer"></div>
<script th:src="@{/script/system/dictData/list.js}"></script>
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermission('system:dictData:edit')}]];
    var removeFlag = [[${@permission.hasPermission('system:dictData:remove')}]];
    var statusDatas = [[${@dict.getData('normal_status')}]];
    var whetherDatas = [[${@dict.getData('yes_no')}]];
    var prefix = ctx + "system/dictData";
</script>
</body>
</html>